0005 FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
To add a single entry, change this to:
0006 FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
(If you *do* own Codewarrior and *have* installed the Mcmd template into ResEdit, the above step can be performed by clicking on the asterisks in the template window and then selecting "Insert New Field(s)" from ResEdit's resource menu. Since all values should be "-1", it doesn't matter if you add it at the top or bottom, as long as the number of entries matches the number of menu items in MENU resource ID 230.)
1st string: name of the form/search window. This does not need to match the name of the resource/menu item, but it will probably be similar, perhaps with "Search" prepended.
2nd string: The action URL of the HTML form which the window is based on.
3rd: The form method. At this time, only "GET" is supported. Anything else will raise a signal.
4th: reserved. This string is currently ignored, like some others to follow. To be safe, just leave the string "reserved" as its value, or blank, as in "". In the future, if I add features which use these fields, I will interpret "reserved" or "" as the default value.
5th: a string of hidden data values. This is perhaps the most complex, but it is really not that difficult to figure out. As of right now, the WannaBe form window can only interpret one text INPUT field to place in the window along with a submission button. Many forms require more fields, however. These can be added by default, via this 5th string. The string should consist of the appropriate <name>=<value> pairs separated by '&'. For instance:
search=web&format=textonly&listings=20
Such a string can be constructed by looking at the HTML for the form you wish to use and choosing the values for the various input fields that won't be shown. If you do not wish any extra hidden data to be added in this way, be sure to leave the field blank, without any spaces whatsoever.
6th: number of input fields. At this time, only "1" is supported. Anything else will raise a signal.
7th: label for the first input field. This could be something like: "Enter query:"
8th: type for the first input field. At this time, only "text" is supported.
9th: name for the first input field. This should be the value of the "name" attribute of the INPUT tag for the HTML form you wish to emulate.
10th: initial value for the first input field. This is the initial text you wish to appear in the edit box. Typically blank.
11th: reserved
12th: reserved
Remember to be careful about not adding extra spaces, as they may screw up the generation of a proper URL to be sent to a server. You may also want to keep a copy of your custom 'STR#' resources in a separate resource file to make it easier to transfer them to updated versions of WannaBe.
Back to WannaBe Help.